package demo04;

import java.util.Scanner;

public class Test01Math {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入范围内最小的数");
        double min=sc.nextDouble();
        System.out.println("请输入范围内最大的数");
        double max=sc.nextDouble();
        int number=0;
        for (double i = min; i <=max; i++) {
            if(Math.abs(i)>6||Math.abs(i)<2.1){
                number++;
            }
        }
        System.out.println("在"+min+"到"+max+"之间，绝对值大于6或小于2.1的整数有"+number+"个");
    }
}
